/**********************************************
 * 
 * File Name				:	ResourceApplicationUtil.java
 * 
 * Last Changed Date		: 	$Date: 2009-08-01 11:12:53 +0800 (星期六, 01 八月 2009) $
 * 
 * Last Changed Revision	:	$Revision: 86 $
 * 
 * Last Changed Author		:	$Author: cfanboy $
 * 
 * File Header URL			:	$HeadURL: svn://www.svnhost.cn/Busi-Building/code/branch/src/com/busibuilding/common/resources/ResourceApplicationUtil.java $
 * 
 * ********************************************
 */

package com.busibuilding.common.resources;

import java.util.Locale;
import java.util.ResourceBundle;

import com.busibuilding.common.Constants;
import com.busibuilding.common.IConfigConstant;

/**
 * Class Name: ResourceApplicationUtil.java 
 * Description: The Properties utils
 * @author: YU Zhipeng
 * @version: 1.0
 * @since: 1.0
 * Date: 2009-07-09
 */
public class ResourceApplicationUtil implements IConfigConstant, Constants {
	private static ResourceBundle rb = null;
	static {
		rb = ResourceBundle.getBundle(RESOURCE_APPLICATION, Locale.getDefault());
	}

	/**
	 * Get the error value from properties
	 * @param key
	 * @return String
	 */
	public static String getStringValue(String key) {
		String value = Constants.EMPUT_STRING;
		try {
			if (rb != null) {
				value = rb.getString(key);
			}
		} catch (Exception e) {
			return value;
		}

		return value;
	}
}
